package com.laundry.dao;

import com.laundry.entity.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface OrderDao extends JpaRepository<Order, Long> {
    Order findByOrderNo(String orderNo);
    List<Order> findByUserId(Long userId);
    List<Order> findByUserIdAndStatus(Long userId, Integer status);
    List<Order> findByStatusIn(List<Integer> statusList);
    List<Order> findByUserIdAndStatusIn(Long userId, List<Integer> statusList);
    List<Order> findByPaymentTimeGreaterThanEqualAndPaymentTimeLessThanAndStatusGreaterThan(
        Date startTime, Date endTime, Integer status);
    List<Order> findByCreateTimeBetweenAndStatusGreaterThan(Date startTime, Date endTime, Integer status);
    List<Order> findByStatus(Integer status);
    List<Order> findByOrderNoContainingAndStatus(String orderNo, Integer status);
    List<Order> findByPaymentTimeBetweenAndStatusGreaterThan(Date startTime, Date endTime, Integer status);
    List<Order> findByOrderNoContaining(String orderNo);
} 